package com.breakfast.fun.data.entity.user.submit;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/22.
 */

public class OrderInfoData {
    private double totalPrice;
    private double freePrice;
    private String orderNo;
    private int orderId;
    private int goodsCount;
    private double accountMoney;
    private String orderTime;

    public static OrderInfoData objectFromData(String str) {

        return new Gson().fromJson(str, OrderInfoData.class);
    }

    public static List<OrderInfoData> arrayDataBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<OrderInfoData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public double getFreePrice() {
        return freePrice;
    }

    public void setFreePrice(double freePrice) {
        this.freePrice = freePrice;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(int goodsCount) {
        this.goodsCount = goodsCount;
    }

    public double getAccountMoney() {
        return accountMoney;
    }

    public void setAccountMoney(double accountMoney) {
        this.accountMoney = accountMoney;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }
}
